package com.dodock.banglapapers.server;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.dodock.banglapapers.server.generator.DDNGetNewsDetailGenerator;
import com.google.appengine.api.datastore.DatastoreService;
import com.google.appengine.api.datastore.DatastoreServiceFactory;
import com.google.appengine.api.datastore.Entity;
import com.google.appengine.api.datastore.KeyFactory;
import com.google.appengine.api.datastore.Text;

@SuppressWarnings("serial")
public class DDNClearNewsDetail extends HttpServlet {
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp){
		resp.setContentType("text/plain");
		resp.setCharacterEncoding("UTF-8");
		try {
			DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
			datastore.delete(KeyFactory.createKey("NewsDetails", req.getParameter("id") + "__" + req.getParameter("newsid")));
			resp.getWriter().write("deleted");
		}
		catch (Exception e) {
			
		}
	}
}
	
